package shplate

class TestRowToColController {

    def dynamicQueryService

    def testRowToCol() {
        Long begin = System.currentTimeMillis();
        def tableHead = []
        def report_011 = []
        def tableHeadList = []
        if ('Excel'.equals(params.EXPORT_CONTENT_NAME)) {
            params.SYS_QUERY_NAME = 'testRowToColList'
            report_011 = dynamicQueryService.queryForList(params)
            report_011 = com.tsqc.system.util.table.TranposUtils.colToRow('NAME', 'VALUE', report_011)
            if (report_011.size() > 0) {
                tableHeadList = report_011[0].keySet()
            }
        }
        Long end = System.currentTimeMillis();
        print("Time:" + (end - begin) / 1000 + " s");
        print("success");
        [
                report_011   : report_011,
                tableHeadList: tableHeadList
        ]
    }
}